<%--
  Created by IntelliJ IDEA.
  User: 帅帅的奇奇
  Date: 2019/5/13
  Time: 19:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <link href="css/style.css" rel="stylesheet"/>
    <link href="css/base.css" rel="stylesheet"/>
    <script src="js/jquery1.42.min.js" type="text/javascript"></script>
    <script src="js/jquery.SuperSlide.2.1.3.js" type="text/javascript"></script>
    <script src="js/flexible.min.js" type="text/javascript"></script>
    <title>实名认证</title>
</head>
<body style="background-color: rgb(242,242,242);">
<div class="warm_title">
    <div class="on">打款账户</div>
<%--    <div >实名认证</div>--%>
</div>
<div class="warm_conten">
    <!-- 1-->
    <div>
        <div class="Warm_prompt">
            <img src="img/hy26.png">
            <div class="prompt">温馨提示</div>
            <div class="prompt_conent">请输入支付宝账号进行认证，做为转账账号</div>
        </div>

        <div class="account_pwd">
            <div><span>姓名</span><input type="text" id="name" value="${memberInfo.realName}" placeholder="请输入真实姓名" /></div>
            <div><span>账号</span><input type="text" id="zhifu" value="${memberInfo.alipayAccount}" placeholder="请输入支付宝账号" /></div>
        </div>
    </div>
    <!-- 2-->
    <div>
        <div class="Warm_prompt">
            <img src="img/hy26.png">
            <div class="prompt">温馨提示</div>
            <div class="prompt_conent">请输入支付宝账号进行认证，做为转账账号</div>
        </div>
<%--        <div class="account_pwd1">--%>
<%--        <div><span>姓名</span><input     type="text" value="${memberInfo.realName}" placeholder="请输入真实姓名" /></div>--%>
<%--        <div><span>身份证号</span><input  type="text"  placeholder="请输入身份证号" /></div>--%>
<%--    </div>--%>
    </div>
</div>

<button class="tijioa"  onclick="realName()">提交</button>
</body>

<script>
    //选项卡
    $('.warm_conten>div').eq(0).show();
    $('.warm_title >div').click(function(){
        var index = $(this).index()
        console.log(index)
        $(this).addClass('on')
        $(this).siblings().removeClass('on')
        $('.warm_conten>div').eq(index).show();
        $('.warm_conten>div').eq(index).siblings().hide();
    })
</script>
<script>
    function realName() {
        var name=$("#name").val();
        var zhifu=$("#zhifu").val();
        console.log(name);
        console.log(zhifu);
        $.ajax({
            url: '/mobile/realName',
            type: 'POST',
            async: true,
            data: {
                name: name,
                zhifu: zhifu,
            },
            dataType: 'json',
            beforeSend:function(xhr){
                /*console.log(xhr)
                 console.log('发送前')*/
            },
            success: function (data) {
                if (data.code == "true") {
                    alert("认证成功");
                } else {
                    alert("认证失败");
                }
            },
        });
    }
</script>
</html>